package com.humble.humbleojjudgeservice.judge.codeSandbox;/*
  humble keep gonging
*/


import com.humble.humbleojmodel.model.codeSandbox.ExecuteCodeRequest;
import com.humble.humbleojmodel.model.codeSandbox.ExecuteCodeResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class SandboxProxy implements Sandbox {

    private Sandbox sandbox;

    public SandboxProxy(Sandbox sandbox) {
        this.sandbox = sandbox;
    }

    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest request) throws Exception {
        log.info(request.toString());
        ExecuteCodeResponse executeCodeResponse = sandbox.executeCode(request);
        log.info(executeCodeResponse!=null?executeCodeResponse.toString():"");
        return executeCodeResponse;
    }
}
